import { ref, h } from "vue";
import { render } from "@/utils";
import LinkText from "@/components/LinkText/index.vue";

export const columns = [
  {
    title: "名称",
    dataIndex: "name",
    render,
  },
  {
    title: "CPU(单位:核)",
    dataIndex: "vcpu",
    render,
    // width: 200,
  },
  {
    title: "内存(单位:GB)",
    dataIndex: "memory",
    // width: 90,
    render,
  },
  {
    title: "创建信息",
    dataIndex: "lastTime",
    slotName: "lastTime",
    width: 170,
    render: ({ record }) =>
      h(LinkText, { label: record?.createTime, desc: record?.createBy }),
  },
  {
    title: "变更信息",
    dataIndex: "lastTime",
    slotName: "lastTime",
    width: 170,
    render: ({ record }) =>
      h(LinkText, { label: record?.updateTime, desc: record?.updateBy}),
  },
  {
    title: "操作",
    width: 120,
    dataIndex: "action",
    fixed: "right",
    slotName: "action",
  },
]
